﻿using System;

class PrimeInteger
{
    static void Main()
    {
        Console.WriteLine("Enter a number to check if it is prime or not:");
        int number = Int32.Parse(Console.ReadLine());
        int startDevider = 2;
        int endDevider = (int)Math.Sqrt(number);
        bool primeCheck = true;
        if (number > 1)
        {
            while (primeCheck && (startDevider <= endDevider))
            {
                if (number % startDevider == 0)
                {
                    primeCheck = false;
                    Console.WriteLine("The number is not a prime.");
                }
                startDevider++;
            }
            if (primeCheck)
            {
                Console.WriteLine("The number is a prime.");
            }
        }
        else
        {
            Console.WriteLine("The number is not a prime.");
        }
    }
}
